package com.akjava.lib.android.activity;

import android.os.Bundle;
import android.util.Log;

import com.akjava.lib.android.opengl.SimpleGameGLSurfaceView;

public abstract class GLPausePatternActivity extends PausePatternActivity{

	
	public abstract String getAppKey();
	
	protected SimpleGameGLSurfaceView mGLView;
	boolean paused=false;
	

	@Override
	public void doPause() {
		  mGLView.onPause();
		  Log.i(getAppKey(),"pause");
		  paused=true;
	}
	
	/*
	 * OpenGL 初期化されるので、データーの保存に注意
	 * (non-Javadoc)
	 * @see android.app.Activity#onResume()
	 */
	@Override
	public void onResume(){
		super.onResume();
		 Log.i(getAppKey(),"resume");

		//if(paused){
		 mGLView.onResume();
		 paused=false;
		//}
		 
	}

	
	@Override
	public void doRestore(Bundle savedInstanceState) {
		Log.i(getAppKey(),"restore");
	}

	@Override
	public void doSave() {
		Log.i(getAppKey(),"save");
	}

	@Override
	public void doStart() {
		Log.i(getAppKey(),"start");
		
	}
	
}
